import api from '../api.js'
export default {
  GetRoleListData (params) {
    return api.fetchGet('/authz/role/findBy.do', params);
  },
  SaveRoleData (params) {
    if(params.id){
      return api.fetchPost('/authz/role/update.do', params);
    }else{
      return api.fetchPost('/authz/role/save.do', params);
    }
  },
  DeleteBatchRole (params) {
    return api.fetchPost('/authz/role/delete_batch.do', params);
  },
  FindResourceForSetup (params) {
    return api.fetchGet('/authz/role/find_resource_for_setup.do', params);
  },
  SetPrivilege (params) {
    return api.fetchPost('/authz/role/setup_for_role.do', params);
  }
}